package com.seeyon.apps.brwh.kit;

public class Utils {
    /**
     * 传入一个数字和一个范围区间，判断该数字是否在区间内
     * @param obj
     * @param fw     格式  0-100  用中横线分割
     * @return
     */
    public static Boolean isNumberInRange(Double obj, String fw) {
        String[] split = fw.split("-");
        Double lowerBound  = Double.parseDouble(split[0]);
        Double upperBound  = Double.parseDouble(split[1]);
        if(obj >= lowerBound && obj <= upperBound){
            return true;
        }else{
            return false;
        }
    }

    public static void main(String[] args) {
        String dd = "1.33";
        Double d = Double.parseDouble(dd);
        System.out.println(d);
    }
}
